FROM czernika/laravel-frankenphp-8.3-prod

# Install Cron
RUN apt-get update && \
    apt-get install -y cron

# Copy crontab file to the cron.d directory
COPY ./cron.d/crontab /etc/cron.d/crontab

# Give execution rights on the cron job
RUN chmod 0644 /etc/cron.d/crontab

# Apply cron job
RUN crontab /etc/cron.d/crontab

# Start scheduler
CMD ["cron", "-f"]
